project(rt_main)


set (CUDA_SOURCE_FILES
	./src/geometry.cu
	./src/intersection.cu
)

set(HEADER_FILES
	./include/rt_app.h
	./include/ogre_framework.h 
	
	./include/geometry.cuh
	./include/intersection.cuh
	)

set(SOURCE_FILES
	./src/rt_main.cpp
	./src/ogre_framework.cpp
	
	./src/geometry.cu
	./src/intersection.cu
	)

set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF)

include_directories(${DEPENDENCIES_OGRE_INCLUDE_DIR} ${DEPENDENCIES_OIS_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
#include_directories(${KDSM_INCLUDE_DIR})

# Setup output directory
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${RT_BUILD_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${RT_BUILD_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${RT_BUILD_DIR}/bin")

SOURCE_GROUP("include" FILES ${HEADER_FILES})
SOURCE_GROUP("src" FILES ${SOURCE_FILES})

CUDA_COMPILE(CUDA_FILES ${CUDA_SOURCE_FILES})
add_executable(rtmain WIN32 ${HEADER_FILES} ${SOURCE_FILES} ${CUDA_FILES})
target_link_libraries(rtmain ${DEPENDENCIES_OGRE_LIBRARY} ${DEPENDENCIES_OIS_LIBRARY})

#target_link_libraries(rtmain Plugin_KDTreeSceneManager)
SET_TARGET_PROPERTIES(rtmain PROPERTIES DEBUG_POSTFIX _d)
